package com.his.struts.util;

public class NumberUtils {

	public static int toInt(String numStr, int defaultValue) {
		int result;
		try {
			result = Integer.parseInt(numStr);
		} catch (Exception e) {
			result = defaultValue;
		}
		return result;
	}
	
	public static boolean isInt(String numStr){
		try {
			Integer.parseInt(numStr);
		} catch (Exception e) {
			return false;
		}
		return true;
	}
}
